import request from '@/utils/request'
import qs from 'qs'
export function login(data) {
  return request({
    url: '/sys/login',
    method: 'post',
    data: qs.stringify(data)
  })
}

export function getInfo(token) {
  return request({
    url: '/sys/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/sys/user/logout',
    method: 'post'
  })
}
export function getCaptcha(uuid) {
  return request({
    url: `/captcha.jpg?uuid=${uuid}`,
    method: 'get'
  })
}
export function loadMenu() {
  return request({
    url: '/sys/menu/loadMenu',
    method: 'get'
  })
}
